<!DOCTYPE html>

<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/jquery-3.7.1.min.js"></script>
		<script type="application/javascript">
			function chat() {

			  $.ajax({
				type: "GET",
				url: "http://localhost:8080/chat",
				data: {
				  "question": $("#myquestion").val()
				},
				success: function(data) {
				   $("#chatresult").val(data);
				}
			  });
			}

		</script>
	</head>
	<body>
		<table border="2" width="60%" height="100%" align="center">
			<tr>
				<td width="20%" align="center">
					<br><br><br>
					<font color="red" size="4"><b>AI创作</b></font>
					<br><br><br><br><br><br><br>
					<a href="img.html">AI配图</a><br><br><br><br><br><br><br>会员<br><br><br><br><br><br><br>
				</td>
				<td align="center" valign="top">
					<br><br>
					<input type="text" size="60" id="myquestion" placeholder="请输入您的问题">
					<input type="button" value="AI文案生成" onclick="chat()">
					<br><br>
					<textarea rows="20" cols="70" id="chatresult"></textarea>
					<br><br>
					<input type="button" value="复制文案" />
				</td>
			</tr>
		</table>
	</body>
</html>
